package org.thanos.demo.consumer;

import com.lmax.disruptor.EventHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Component;
import org.thanos.demo.entity.LogEvent;

@Component
public class LogEventConsumer implements EventHandler<LogEvent> {

    private static final Logger LOGGER = LoggerFactory.getLogger(LogEventConsumer.class);

    public void onEvent(LogEvent logEvent, long seq, boolean bool) throws Exception {
        LOGGER.info("topic:{}, content:{}", logEvent.getTopic(), logEvent.getContent());
    }

}